﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLToolkit.Data;
using BLToolkit.Mapping;
using BLToolkit.DataAccess;
using BLToolkit.Data.Sql.SqlProvider;
using BLToolkit.Data.DataProvider;
using System.Runtime.Serialization;

namespace nwrole.toolbox.sync.entity
{

    public enum MessageStatusEnum
    {
        New = 0,
        Locked = 10,
        Processed = 20,
        Error = 1000,
    }

    [DataContract]
    [TableName("SyncMessage")]
    public class SyncMessage
    {
        [DataMember]
        [PrimaryKey, Identity, SequenceName("nwrole")]
        public int Id { get; set; }

        [DataMember]
        [MapField("SoapBody")]
        public string SoapBody { get; set; }

        [DataMember]
        [MapField("LockDateTime")]
        public DateTime? LockDateTime { get; set; }

        [DataMember]
        [MapField("MessageStatus")]
        public MessageStatusEnum MessageStatus { get; set; }

        [DataMember]
        [MapField("ServiceAddress")]
        public string ServiceAddress { get; set; }
        
        
    }
}
